package com.xxx.zkconfig.helper;

import com.alibaba.fastjson.JSON;

/**
 * Created by louisyuu on 2020/4/20 下午3:02
 */
public class FastJsonSerializer {


    public byte[] serialize(Object object) {
        return JSON.toJSONBytes(object);

    }


    public <T> T deserialize(Class<T> clazz, byte[] bytes) {
        return JSON.parseObject(bytes, clazz);
    }


}
